package com.cjx.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * AdminResourceEntity:  数据对象
 *
 * @author : cjunxian
 * @since 2021-03-09
 * @version 1.0
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("admin_resource")
public class AdminResourceEntity implements Serializable {

    /**
     * 序列化版本 UID.
     */
    private static final long serialVersionUID=1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 资源名称
     */
    @TableField(value = "resource_name")
    private String resourceName;
    /**
     * 资源路径
     */
    @TableField(value = "url")
    private String url;
    /**
     * 上级id
     */
    @TableField(value = "parent_id")
    private String parentId;


    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 操作人id
     */
    @TableField(value = "operator_id")
    private String operatorId;


}
